package com.itheima.neibulei.demo08;

public class Demo {


    public static void main(String[] args) {
        A a = new A();
        a.sing();
        new A(){
          public void sing(){
              System.out.println("你爱谁谁, 我不听");
          }
        }.sing();
    }

}
 class A{
    public void sing(){
        System.out.println("自己写的sing");
    }
}